#ifndef MUTEXLOCK_H
#define MUTEXLOCK_H
#pragma once
#include <pthread.h>
#include <cstdio>
#include "../prohibitassignment.h"

/**
 * 线程互拆锁
 * @brief The MutexLock class
 */
class MutexLock: public ProhibitAssignment
{
public:
    MutexLock();

    ~MutexLock();

    void lock();

    void unlock();

    pthread_mutex_t *get();
private:
    // 线程互拆锁
    pthread_mutex_t mutx;
};

#endif // MUTEXLOCK_H
